package org.openslash.util;

import org.openslash.resource.ResourcePacket;

public abstract class DBAccessor {

	protected ResourcePacket rp;
	protected static DBAccessor dba = null;
	
	public static DBAccessor getDBAccessor()
	{
		return dba;
	}
	
	public ResourcePacket getResourcePacket() {
		return rp;
	}
	
	public static void destroy()
	{
		if( dba != null )
		{
			dba.finish();
			dba.rp = null;
			dba = null;
		}
	}

	protected abstract void finish();
	public abstract ResultList executeQuery(String sqltext, int[] params);
}
